"""
重返未来1999鼠标控制程序
"""
import pyautogui,time
import numpy as np
from detect_object import *
import sys
"""
click_card卡牌点击函数
传参说明
    num---要点击的卡牌
"""
def click_card(num):
    if num == 1:
        pyautogui.click(1832, 422)
        time.sleep(0.4)
    if num == 2:
        pyautogui.click(1767, 422)
        time.sleep(0.4)
    if num == 3:
        pyautogui.click(1702, 422)
        time.sleep(0.3)
    if num == 4:
        pyautogui.click(1627, 422)
        time.sleep(0.3)
    if num == 5:
        pyautogui.click(1550, 422)
        time.sleep(0.3)
    if num == 6:
        pyautogui.click(1480, 422)
        time.sleep(0.3)
    if num == 7:
        pyautogui.click(1401, 422)
        time.sleep(0.3)
    if num == "center":
        pyautogui.click(1455, 286)
        time.sleep(0.3)
"""
click_position点击确定坐标函数
传参说明
    x,y---图像中的坐标
"""
def click_position(x,y):
    x = x + 958
    y = y + 48
    pyautogui.click(x, y)  # 单击左键
    time.sleep(0.4)
"""
下面的程序为调试mouse程序的测试程序，不影响主函数运行，单独运行该文件时才会触发
"""
if __name__ == "__main__":
    while True:
         x,y = pyautogui.position()
         print(x,y)
